function creatStore(config) {
  var state = config || {};
  var list = [];
  var newArr = [];
  return {
    getState: function (data) {
      console.log(state[data]);
    },
    setState: function (key, value) {
      state[key] = value;
      list.push(value);
    },
    subs: function () {
      list.forEach(function (item) {
        newArr = item();
      });
      renderPage(newArr);
    },
  };
}
